#include <vector>
#include <iostream>

struct Point {
    double x, y, z;

    Point(double px, double py, double pz) : x(px), y(py), z(pz) {}
};

int main() {
    std::vector<Point> points;
    points.reserve(5); // 预先分配足够的内存以避免多次内存分配

    // 使用就地构造创建点对象，避免额外的复制或移动
    points.emplace_back(1.0, 2.0, 3.0);
    points.emplace_back(4.0, 5.0, 6.0);
    points.emplace_back(7.0, 8.0, 9.0);

    // 遍历并打印点的坐标
    for (const auto& point : points) {
        std::cout << "Point: (" << point.x << ", " << point.y << ", " << point.z << ")" << std::endl;
    }

    return 0;
}